package com.hou.hpsj_springboot.mapper;

import com.hou.hpsj_springboot.bean.Users;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.ArrayList;
@Mapper
public interface LoginMapper {
    /**
     * 根据邮箱查询用户
     * @param email
     * @return
     */
    @Select("select * from users where email=#{email}")
    Users selectUserByEmail(String email);

    @Insert("INSERT INTO users(passwordhash,email) VALUES (#{passwordhash}, #{email})")
    int insert(Users user);
}
